/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 0
 * Date: 2023-03-21
 * Time: 12:45
 */
public class Date {
    public int year;
    public int month;
    public int day;
    public void setDay(int y, int m, int d){
        year = y;
        month = m;
        day = d;
    }
    public void printDate(){
        System.out.println(year + "/" + month + "/" + day);
    }

    public Date() {
        this(2023,1,23);
        System.out.println("不带参数的构造方法！");
    }

    public Date(int year, int month, int day){
        this.year = year;
        this.month = month;
        this.day = day;
        System.out.println("调用三个参数的构造方法！");
    }

    public static void main(String[] args) {

        Date d = new Date();
        d.printDate();
    }
}
